package com.yz.common.execptions;

import lombok.Getter;

/**
 * @ClassName ApiException
 * @Description Api自定义异常处理类
 * @Author 广长
 * @Date 2020/8/18
 * @Version V1.0
 **/
@Getter
public class ApiException extends RuntimeException{
    private Integer code;

    public Integer getCode() {
        return this.code;
    }

    public ApiException(Integer code) {
        this.code = code;
    }

    public ApiException(String message) {
        super(message);
    }

    public ApiException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public ApiException(Integer code, String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }
}
